/*
	Copyright (c) 2007, ANYwebcam.com Pty Ltd. All rights reserved.

	The software in this package is published under the terms of the BSD style 
	license, a copy of which has been included with this distribution in the 
	license.txt file.
*/
package com.anywebcam.di.error
{
	import com.anywebcam.di.*;

	/**
	 * Thrown when a SetterInjectionComponent attempts to set a parameter that is not writable or does not exist on an implementation
	 */
	public class UnsettableSetterError extends DIComponentError
	{
		/**
		 * @param component The DIComponent that triggered this error
		 * @param setterName The name of the setter that was attempted to be set
		 */
		public function UnsettableSetterError( component:DIComponent, setterName:String )
		{
			super( component, 'Unable to set: '+ setterName +', on component:'+ component );
			
			_setterName = setterName;
		}
		
		/**
		 * @returns The name of the setter that was attempted to be set
		 */
		public function get setterName():Object
		{
			return _setterName;
		}
		
		private var _setterName:String;
	}
}